﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EvaluationUnitManager.aspx.cs"
    Inherits="EnvironmentManagerSystem.EvaluationUnitManager.EvaluationUnitManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link href="../Style/css.css" rel="stylesheet" type="text/css" />

    <script src="../Script/artDialog.js?skin=aero" type="text/javascript"></script>

    <script src="../Script/iframeTools.js" type="text/javascript"></script>

    <script src="../Script/ShowMinPage.js" type="text/javascript"></script>

    <link href="../Style/css.css" rel="stylesheet" type="text/css" />
</head>
<body style="background: #e0e2e7; overflow: visible;">
    <form id="form1" runat="server">
    <div>
        <table align="center" class="style1" style="width: 99%">
            <tr>
                <td align="center" style="height: 10px">
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:GridView ID="gvInfo" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="#333333" GridLines="Vertical" Width="99%" DataKeyNames="ID" BorderColor="Silver"
                        HorizontalAlign="Center" EmptyDataText="无数据" AllowPaging="True" OnPageIndexChanging="gvInfo_PageIndexChanging"
                        OnDataBound="gvInfo_DataBound">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#F0F2F3" Font-Size="12px" Height="16px" HorizontalAlign="Center"
                            VerticalAlign="Middle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" />
                            <asp:BoundField DataField="UnitName" HeaderText="单位名称" />
                            <asp:BoundField DataField="Address" HeaderText="通讯地址" />
                            <asp:BoundField DataField="CertificateNo" HeaderText="证书编号" />
                            <asp:BoundField DataField="Phone" HeaderText="联系电话" />
                            <asp:BoundField DataField="ZipCode" HeaderText="邮政编码" />
                            <asp:BoundField DataField="EvaluationScope" HeaderText="评价范围" />
                            <asp:TemplateField HeaderText="是否有评价文件">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# (Eval("QualificationFileURL").ToString().Trim()).Length>0?"有":"无" %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作">
                                <EditItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">更新</asp:LinkButton>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <a onclick="frm.show('EvaluationUnitManager/EvaluationUnitEdit.aspx?ID=<%# Eval("ID")%>','编辑评价单位',true,900,530)"
                                        style="text-decoration: underline; cursor: hand;">
                                        <asp:Label ID="Label1" runat="server" Text='<%#(Session["roleid"].ToString() == "管理员" ? "编辑" : "查看")%>'></asp:Label>
                                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" OnClientClick="javascript:return confirm('是否删除')"
                                            Visible="false">删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="启用">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtnEnabled" OnCommand="lbtnEnabled_Command" CommandName='<%# Eval("ID") %>'
                                        runat="server">
                                        <%#(Eval("Enabled").ToString() == "1" ? "已启用" : Eval("Enabled").ToString() == "2" ? "未启用":"")%>
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle ForeColor="Black" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle Font-Bold="True" ForeColor="#00286F" CssClass="right_list01_tit" BackColor="#507CD1" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td align="center" style="height: 30px">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <div style="position: fixed; bottom: 0px; background: #e0e2e7; width: 100%;" runat="server"
        id="divInsert">
        <table width="100%">
            <tr>
                <td align="right">
                    <input id="Button1" type="button" value="新增单位" onclick="frm.show('EvaluationUnitManager/EvaluationUnitEdit.aspx','增加评价单位',true,700,520)"
                        class="anniu1" /><asp:Button ID="Button2" runat="server" OnClick="Button2_Click"
                            Text="刷新" CssClass="anniu1" Style="margin-left: 10px; margin-right: 20px;" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
